package com.yunji.order.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yunji.common.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @author : peter-zhu
 * @date : 2024/12/21 13:56
 * @description : TODO
 **/
@Data
public class RefundVO {
    @Excel(name = "退款ID", width = 15)
    @ApiModelProperty("退款ID")
    private Long refundId;

    @ApiModelProperty(value = "订单ID")
    @Excel(name = "订单ID", width = 5)
    private Long orderId;

    @Excel(name = "订单流水号", width = 20)
    @ApiModelProperty(value = "订单流水号/关联订单")
    private String orderCode;

    @ApiModelProperty("退款类型")
    private Integer refundType;

    @ApiModelProperty("退款类型描述/售后类型")
    private String refundTypeDesc;

    @ApiModelProperty("是否取出商品 0 未取出 1 已取出")
    private Integer takenOut;

    @Excel(name = "退款流水号", width = 15)
    @ApiModelProperty("退款流水号/售后单号")
    private String refundCode;

    @ApiModelProperty("退款数量/售后商品数")
    private Integer refundNums;

    @Excel(name = "退款金额", width = 15)
    @ApiModelProperty("退款金额")
    private BigDecimal refundAmount;

    @ApiModelProperty("退款比例")
    private BigDecimal refundRatio;

    @ApiModelProperty("顾客ID")
    private Long memberId;

    @ApiModelProperty("顾客昵称")
    private String memberName;

    @ApiModelProperty("顾客电话/顾客手机")
    private String memberPhone;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "申请时间", dateFormat = "yyyy-MM-dd HH:mm:ss", width = 30)
    @ApiModelProperty("申请时间/创建时间/退款时间")
    private Date applyTime;

    @ApiModelProperty("申请原因code")
    private String applyReasonCode;

    @Excel(name = "申请原因", width = 15)
    @ApiModelProperty("申请原因/售后原因")
    private String applyReason;

    @ApiModelProperty("拒绝原因/不通过原因/不通过意见")
    private String rejectReason;

    @Excel(name = "退款状态", readConverterExp = "0=待审核,1=待退款,-1=不通过,2=退款成功,-2=退款失败,-3=已取消", width = 15)
    @ApiModelProperty("退款状态 (0:待审核;1:待退款;-1:不通过;2:退款成功;-2:退款失败;-3:已取消)")
    private Integer applyStatus;

    @ApiModelProperty("退款状态描述/售后状态/审核结果")
    private String applyStatusDesc;

    @ApiModelProperty("问题描述 这个存快照")
    @NotNull(message = "问题描述不能为空")
    private String issue;

    @ApiModelProperty("问题图片数组")
    @NotNull(message = "问题图片数组不能为空")
    private String issuePics;

    @Excel(name = "审核人ID", width = 15)
    @ApiModelProperty("审核人ID")
    private Long auditor;

    @Excel(name = "审核人名称", width = 15)
    @ApiModelProperty("审核人名称")
    private String auditName;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "审核时间", dateFormat = "yyyy-MM-dd HH:mm:ss", width = 30)
    @ApiModelProperty("审核时间")
    private Date auditTime;

    @Excel(name = "审核备注", width = 15)
    @ApiModelProperty("审核备注")
    private String auditRemark;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "关闭时间", dateFormat = "yyyy-MM-dd HH:mm:ss", width = 30)
    @ApiModelProperty("关闭时间")
    private Date closedTime;

//    @ApiModelProperty("代理ID")
//    private Long agentId;

    @Excel(name = "代理名称", width = 15)
    @ApiModelProperty("代理名称")
    private String agentName;

//    @ApiModelProperty("网点ID")
//    private Long siteId;

    @Excel(name = "网点名称", width = 15)
    @ApiModelProperty("网点名称")
    private String siteName;

//    @ApiModelProperty("点位ID")
//    private Long locationId;

    @ApiModelProperty("点位名称")
    private String locationName;

    @ApiModelProperty("点位类型名称")
    private String locationTypeName;

//    @ApiModelProperty("货柜ID")
//    private Long containerId;

    @Excel(name = "货柜名称", width = 15)
    @ApiModelProperty("货柜名称")
    private String containerName;

    @ApiModelProperty("是否返回库存 0 不返回 1 返回")
    private Integer auditBackStock;

    @ApiModelProperty("退款明细列表(因性能问题只要详情会给,列表不会给)")
    private List<RefundDetailVO> detailList;
}
